<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>喜乐康智能家居系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%> 
	<script type="text/javascript">
		var roomDeviceCurrentPage = 1;
		currentDevice=0;
		currentDeviceId = 0;
		function deviceRoomListUp(upDown){
			 listOpenUp(roomDeviceCurrentPage,"roomDeviceCurrentPage",<s:property value="deviceList.size()"/>,18,
					 "device_use_content_top_right_up",
					 "room_up.png",
					 "room_up_press.png",
					 "device_use_img_li",upDown);
		}
		
		
		function deviceListOpenDown(upDown){
			listOpenDown(roomDeviceCurrentPage,"roomDeviceCurrentPage",<s:property value="deviceList.size()"/>,18,
					"device_use_content_top_right_down",
					"room_down.png",
					"room_down_press.png",
					"device_use_img_li",upDown);
			
		}

		

		
	</script>
  </head>
  
  <body>
  
  	<div class="device_use_content_top_right_list">
		<ul>
			<s:iterator id="device" value="deviceList" status="status">
				<li onclick="pressDevice(<s:property value="deviceId" />,'<s:property value="#status.index+1" />','<s:property value="deviceType" />');" id="device_use_img_li<s:property value="#status.index+1" />" 
					<s:if test="deviceType==1 && isOpen == 1">
	   					class="device_use_img_li_on_off_open"
	   				</s:if>	
	   				<s:elseif test="deviceType==1 && isOpen == 0">
						class="device_use_img_li_on_off"
					</s:elseif>
					<s:elseif test="deviceType==2 && isOpen == 1">
						class="device_use_img_li_turn_open"
					</s:elseif>
					<s:elseif test="deviceType==2 && isOpen == 0">
						class="device_use_img_li_turn"
					</s:elseif>
	   				<s:elseif test="deviceType==3 && isOpen == 1">
						class="device_use_img_li_socket_open"
					</s:elseif>	
					<s:elseif test="deviceType==3 && isOpen == 0">
						class="device_use_img_li_socket"
					</s:elseif>	
					<s:if test="#status.index+1 > 18">
	   					style="display:none;"
	   				</s:if>	
				><s:property value="deviceName"/></li>
			</s:iterator>
			
		</ul>
	</div>
	<div class="device_use_content_top_right_up_down">
		<div class="device_use_content_top_right_up" onmousedown="deviceRoomListUp('down')" onmouseup="deviceRoomListUp('up')">
		</div>
		<div class="device_use_content_top_right_down" onmousedown="deviceListOpenDown('down')" onmouseup="deviceListOpenDown('up')">
		</div>
	</div>
  </body>
</html>
